<div nz-row nzGutter="8">
    <div nz-col [nzXl]="20" [nzLg]="24" [nzSm]="24" [nzXs]="24">
        <sf #sf [schema]="searchSchema" [ui]="{ '*': { spanLabelFixed: 100,grid: { lg: 12, md: 12, sm: 12, xs: 24 } }}"
            [compact]="true" [button]="'none'"></sf>
    </div>
    <div nz-col [nzXl]="4" [nzLg]="24" [nzSm]="24" [nzXs]="24" class="text-right">
        <button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="st?.load(1)">查询</button>
        <button nz-button [disabled]="false" (click)="resetSF()">重置</button>
    </div>
</div>

<div class="d-flex align-items-center mb-md mt-md">
    <button nz-button nzType="primary" (click)="functionAction()">新增</button>
</div>

<st #st [data]="service.$api_get_functions_by_id" [columns]="columns" bordered size="small"
    [req]="{ method: 'POST', allInBody: true, process: beforeReq }" [res]="{ reName: { list: 'data' } }"
    [page]="{ show: false}" [loading]="false" class="mt-md">
    <ng-template st-row="permissionsCode" let-item let-index="index">
        <p nz-typography nzCopyable [nzCopyText]="code+'-'+item.permissionsCode" style="margin-bottom: 0;">
            {{code}}-{{item.permissionsCode}} </p>
    </ng-template>
</st>


<ng-template #configTypeItemModal>
    <div se-container [labelWidth]="110" [col]="2">
        <se label="权限名称" required>
            <input nz-input [(ngModel)]="functionInfo.permissionsName" placeholder="请输入权限名称" [disabled]="isDisabled" />
        </se>
        <se label="权限编码" required>
            <input nz-input [(ngModel)]="functionInfo.permissionsCode" placeholder="请输入权限编码" [disabled]="isDisabled" />
        </se>
        <se label="api地址">
            <input nz-input [(ngModel)]="functionInfo.permissionsUrl" placeholder="请输入权限路径" [disabled]="isDisabled" />
        </se>
    </div>
</ng-template>